package com.nwcl.basic.service;

import com.nwcl.basic.bo.GoodsBO;
import com.nwcl.basic.bo.GoodsSpaceBO;

import java.math.BigDecimal;

/**
 * @author liguiqin
 * @date 2023/5/26
 */
public interface GoodsSpaceService {
    /*
     * @Description:根据商品id查询商品空间信息
     * @Author liguiqin
     * @Date 2023/5/26 14:16
     * @param: goodsId
     * @return com.nwcl.basic.bo.GoodsSpaceBO
     * @UpdateDate 2023/5/26 14:16
     **/
    GoodsSpaceBO getByGoodsId(Integer goodsId);

    /*
     * @Description:   校验商品库存及扣减库存
     * @Author liguiqin
     * @Date 2023/5/26 14:28
     * @param: goodsBO 商品信息
     * @param: userId 用户id
     * @param: userIntegral 用户积分
     * @return void
     * @UpdateDate 2023/5/26 14:28
     **/
    void deduction(GoodsBO goodsBO, Integer userId, BigDecimal userIntegral,Integer num) throws RuntimeException;
}
